Skip to content

U/sgriffin/vc2026#167

Open
stephenegriffin wants to merge 21 commits intomainfrom
u/sgriffin/vc2026
Open

U/sgriffin/vc2026#167
stephenegriffin wants to merge 21 commits intomainfrom
u/sgriffin/vc2026

Conversation

@stephenegriffin
Copy link
Member

No description provided.

- Create Directory.Build.props for centralized build configuration
- Update solution file to VS 18 format
- Update .vsconfig to require Windows 11 SDK (10.0.22621.0)
- Remove PlatformToolset and WindowsTargetPlatformVersion from mapistub.vcxproj
- Remove Guardian .gdn ruleset references (CI-only dependency)

Breaking change: Requires Visual Studio 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit a5125bb. ± Comparison against base commit 9d1e8b0.

♻️ This comment has been updated with latest results.

stephenegriffin and others added 6 commits February 6, 2026 18:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Windows/Visual Studio build setup to target a newer toolset/SDK baseline and align CI/security scanning workflows with those build requirements.

Changes:

  • Centralizes MSBuild defaults (toolset/SDK pin + security/quality flags) via Directory.Build.props and removes per-configuration duplication from the .vcxproj.
  • Updates the solution/project configurations (drops Prefast configs) and bumps the .sln Visual Studio version metadata.
  • Updates GitHub Actions workflows (new Windows runner label, ARM64EC matrix, Windows 11 SDK install step) and bumps CodeQL action SHAs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
mapistub.vcxproj Removes per-config toolset/SDK/security flags and drops Prefast/Fuzz ARM64* configurations in favor of repo-wide props.
mapistub.sln Updates VS version metadata and removes Prefast solution configurations.
Directory.Build.props Introduces centralized toolset/SDK pin and baseline compiler/link security settings.
.vsconfig Updates required SDK component to Windows 11 SDK 22621.
.github/workflows/github-ci.yml Switches to a VS2026 runner label, adds ARM64EC to the build matrix, and installs Windows 11 SDK.
.github/workflows/codeql.yml Switches to a VS2026 runner label, installs Windows 11 SDK, and updates CodeQL action SHAs.
.github/workflows/scorecards.yml Updates upload-sarif action SHA.
.github/workflows/devskim.yml Updates upload-sarif action SHA.
.github/workflows/clang.yml Replaces the clang-format action with an apt-based install + manual formatting check script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

stephenegriffin and others added 5 commits February 17, 2026 17:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

mapistub.sln:24

  • The solution file is missing Fuzz configurations for Win32 and x64, but these configurations still exist in the mapistub.vcxproj file (lines 23-28, 103-109, 135-141). This inconsistency will prevent building Fuzz configurations from the solution. Either add Fuzz|Win32 and Fuzz|x64 to the solution file, or remove these configurations from the project file as well.
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug_Unicode|x64 = Debug_Unicode|x64
		Debug_Unicode|Win32 = Debug_Unicode|Win32
		Debug_Unicode|ARM64 = Debug_Unicode|ARM64
		Debug_Unicode|ARM64EC = Debug_Unicode|ARM64EC
		Debug|x64 = Debug|x64
		Debug|Win32 = Debug|Win32
		Debug|ARM64 = Debug|ARM64
		Debug|ARM64EC = Debug|ARM64EC
		Release_Unicode|x64 = Release_Unicode|x64
		Release_Unicode|Win32 = Release_Unicode|Win32
		Release_Unicode|ARM64 = Release_Unicode|ARM64
		Release_Unicode|ARM64EC = Release_Unicode|ARM64EC
		Release|x64 = Release|x64
		Release|Win32 = Release|Win32
		Release|ARM64 = Release|ARM64
		Release|ARM64EC = Release|ARM64EC

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

package.json Outdated
"build:all": "npm run build:x64 && npm run build:x86 && npm run build:arm64",
"clean": "node-gyp clean",
"clean:all": "node-gyp clean && rmdir /s /q build 2>nul || true"
"msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\"\"",
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'msbuild' script uses a PowerShell command with escaped quotes that attempts to locate MSBuild.exe. However, this script will fail if Visual Studio is not installed or if it's installed in a non-standard location. Consider adding error handling to check if vswhere.exe exists and if MSBuild is found. Additionally, the script uses a PowerShell variable interpolation that might not work correctly when invoked through npm due to quote escaping. The use of double backslashes in the path may also cause issues. Consider simplifying this or adding validation.

Suggested change
"msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\"\"",
"msbuild": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$pf86 = ${env:ProgramFiles(x86)}; $vswhere = Join-Path $pf86 'Microsoft Visual Studio\\Installer\\vswhere.exe'; if (-not (Test-Path $vswhere)) { Write-Error 'vswhere.exe not found. Install Visual Studio Build Tools or Visual Studio.'; exit 1 }; $vsPath = & $vswhere -latest -requires Microsoft.Component.MSBuild -property installationPath; if (-not $vsPath) { Write-Error 'MSBuild not found via vswhere.'; exit 1 }; $msbuild = Join-Path $vsPath 'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe'; if (-not (Test-Path $msbuild)) { Write-Error ('MSBuild.exe not found at ' + $msbuild); exit 1 }; & $msbuild @args\"",

Copilot uses AI. Check for mistakes.
package.json Outdated
Comment on lines 6 to 45
"msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\"\"",

"build": "npm run build:debug:x64",
"build:debug": "npm run build:debug:x64",
"build:debug:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=x64",
"build:debug:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=Win32",
"build:release": "npm run build:release:x64",
"build:release:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=x64",
"build:release:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=Win32",

"build:debug:ansi": "npm run build:debug:ansi:x64",
"build:debug:ansi:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=x64",
"build:debug:ansi:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=Win32",
"build:release:ansi": "npm run build:release:ansi:x64",
"build:release:ansi:x64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=x64",
"build:release:ansi:x86": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=Win32",

"build:all": "npm run build:all:x64 && npm run build:all:x86",
"build:all:x64": "npm run build:debug:x64 && npm run build:release:x64 && npm run build:debug:ansi:x64 && npm run build:release:ansi:x64",
"build:all:x86": "npm run build:debug:x86 && npm run build:release:x86 && npm run build:debug:ansi:x86 && npm run build:release:ansi:x86",

"build:debug:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64",
"build:release:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64",
"build:debug:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64",
"build:release:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64",
"build:all:arm64": "npm run build:debug:arm64 && npm run build:release:arm64 && npm run build:debug:ansi:arm64 && npm run build:release:ansi:arm64",

"build:debug:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64EC",
"build:release:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC",
"build:debug:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64EC",
"build:release:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64EC",
"build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec && npm run build:debug:ansi:arm64ec && npm run build:release:ansi:arm64ec",

"clean": "npm run msbuild -- mapistub.sln /t:Clean",

"gyp:build": "node-gyp rebuild",
"gyp:build:x64": "node-gyp configure --arch=x64 && node-gyp build --arch=x64",
"gyp:build:x86": "node-gyp configure --arch=ia32 && node-gyp build --arch=ia32",
"gyp:build:arm64": "node-gyp configure --arch=arm64 && node-gyp build --arch=arm64",
"gyp:clean": "node-gyp clean"
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build scripts have been completely reorganized from node-gyp based commands to MSBuild based commands. The old 'build' script ran 'node-gyp rebuild', but now runs 'npm run build:debug:x64'. This is a breaking change for users following the documentation in docs/Building.md which references 'npm run build', 'npm run build:x64', 'npm run build:x86', 'npm run build:arm64', and 'npm run build:all'. These scripts no longer work as documented - they now invoke MSBuild instead of node-gyp and have different behavior. The old node-gyp scripts have been renamed to 'gyp:build', 'gyp:build:x64', etc. The documentation needs to be updated to reflect these changes, or the script names should be kept backward compatible.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to +74
$proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru
if (!(Test-Path $sdkPath)) {
Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installer process exit code is captured in $proc but never checked. If the installer exits non-zero (or partially installs), the subsequent path check may not provide a clear failure reason. Consider validating $proc.ExitCode and surfacing the last lines of the log when it fails.

Suggested change
$proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru
if (!(Test-Path $sdkPath)) {
Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50
$logPath = Join-Path $env:TEMP "sdk_install.log"
$proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log `"$logPath`"" -Wait -PassThru
if ($proc.ExitCode -ne 0) {
Get-Content $logPath -ErrorAction SilentlyContinue | Select-Object -Last 50
Write-Error "Windows SDK installer exited with code $($proc.ExitCode)"
exit 1
}
if (!(Test-Path $sdkPath)) {
Get-Content $logPath -ErrorAction SilentlyContinue | Select-Object -Last 50

Copilot uses AI. Check for mistakes.
Comment on lines +69 to +71
if (!(Test-Path $sdkPath)) {
Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50
Write-Error "Windows SDK installation failed"
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installer process exit code is captured in $proc but not checked. Consider validating $proc.ExitCode and failing with a clearer message/log snippet when the install fails.

Suggested change
if (!(Test-Path $sdkPath)) {
Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50
Write-Error "Windows SDK installation failed"
if ($proc.ExitCode -ne 0 -or !(Test-Path $sdkPath)) {
Write-Host "Last 50 lines of SDK install log (if available):"
Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50
if ($proc.ExitCode -ne 0) {
Write-Error "Windows SDK installer exited with code $($proc.ExitCode)."
} elseif (!(Test-Path $sdkPath)) {
Write-Error "Windows SDK installation may have failed: SDK path '$sdkPath' not found after installer completed successfully."
}

Copilot uses AI. Check for mistakes.
"build:release:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64EC",
"build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec && npm run build:debug:ansi:arm64ec && npm run build:release:ansi:arm64ec",

"clean": "npm run msbuild -- mapistub.sln /t:Clean",
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean runs msbuild /t:Clean without specifying Configuration/Platform, so it will only clean the solution default and may leave other outputs behind (especially after building multiple platforms). Consider adding configuration/platform-specific clean scripts (or a clean:all that iterates the supported matrix).

Suggested change
"clean": "npm run msbuild -- mapistub.sln /t:Clean",
"clean": "npm run clean:all",
"clean:all": "npm run clean:x64 && npm run clean:x86 && npm run clean:arm64 && npm run clean:arm64ec",
"clean:x64": "npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=x64 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=x64 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug /p:Platform=x64 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release /p:Platform=x64",
"clean:x86": "npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=Win32 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=Win32 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug /p:Platform=Win32 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release /p:Platform=Win32",
"clean:arm64": "npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=ARM64 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=ARM64 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug /p:Platform=ARM64 && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release /p:Platform=ARM64",
"clean:arm64ec": "npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=ARM64EC && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=ARM64EC && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Debug /p:Platform=ARM64EC && npm run msbuild -- mapistub.sln /t:Clean /p:Configuration=Release /p:Platform=ARM64EC",

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +37
"build:debug:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64",
"build:release:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64",
"build:all:arm64": "npm run build:debug:arm64 && npm run build:release:arm64 && npm run build:debug:ansi:arm64 && npm run build:release:ansi:arm64",

"build:debug:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64EC",
"build:release:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC",
"build:debug:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64EC",
"build:release:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64EC",
"build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec && npm run build:debug:ansi:arm64ec && npm run build:release:ansi:arm64ec",
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI explicitly skips ANSI builds for ARM64/ARM64EC, but the npm scripts expose build:*:ansi:arm64* and include them in build:all:arm64 / build:all:arm64ec. Either remove these scripts (if ANSI isn’t supported for ARM64/ARM64EC) or add CI coverage so they don’t silently bit-rot.

Suggested change
"build:debug:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64",
"build:release:ansi:arm64": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64",
"build:all:arm64": "npm run build:debug:arm64 && npm run build:release:arm64 && npm run build:debug:ansi:arm64 && npm run build:release:ansi:arm64",
"build:debug:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64EC",
"build:release:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC",
"build:debug:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug /p:Platform=ARM64EC",
"build:release:ansi:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release /p:Platform=ARM64EC",
"build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec && npm run build:debug:ansi:arm64ec && npm run build:release:ansi:arm64ec",
"build:all:arm64": "npm run build:debug:arm64 && npm run build:release:arm64",
"build:debug:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64EC",
"build:release:arm64ec": "npm run msbuild -- mapistub.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC",
"build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec",

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +27
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format-17

Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing clang-format-17 via apt-get on ubuntu-latest is not stable because the available package versions change as the runner image updates. To avoid formatting CI breaking when the package isn’t available, consider using the previously used clang-format action, pinning an Ubuntu version, or adding the LLVM apt repository for the desired clang-format version.

Copilot uses AI. Check for mistakes.
Comment on lines +56 to +66
# Download and verify installer
$installer = "$env:TEMP\winsdksetup.exe"
$expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0"
Write-Host "Downloading Windows 11 SDK 10.0.22621.0..."
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer

# Verify SHA256 hash
$actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash
if ($actualHash -ne $expectedHash) {
Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash"
exit 1
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SDK install step pins a SHA256 for a fwlink URL. fwlink targets can change over time (even for the same SDK version), which would cause spurious CI failures when the hash no longer matches. Prefer using a stable/package-based install method (e.g., VS workloads/components on the runner, winget, or a versioned direct download URL you control) or making the hash/version pair configurable.

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +73
# Download and verify installer
$installer = "$env:TEMP\winsdksetup.exe"
$expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0"
Write-Host "Downloading Windows 11 SDK 10.0.22621.0..."
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer

# Verify SHA256 hash
$actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash
if ($actualHash -ne $expectedHash) {
Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash"
exit 1
}
Write-Host "SHA256 verified: $actualHash"

# Install SDK
Write-Host "Installing SDK (this may take a few minutes)..."
$proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru
if (!(Test-Path $sdkPath)) {
Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50
Write-Error "Windows SDK installation failed"
exit 1
}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SDK install step pins a SHA256 for a fwlink URL. fwlink targets can change over time, which risks random CI failures when the binary hash changes. Prefer installing via a stable package/component mechanism (or a stable, versioned direct download URL) rather than a mutable fwlink.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments